package com.waltercedric.java.joomla.gridupdater.repository;

import java.io.File;

public class Repository {

	private static final String JOOMLA_1_5 = "/Joomla/1.5/";

	/**
	 * Scan the repository and search for joomla mainVersion the latest patch
	 * level
	 * 
	 * @param mainVersion
	 * @return
	 */
	public int getLatestPatchVersion(double mainVersion) {

		return 21;
	}

	public File getLatestPatchVersionFile(double remoteJoomlaMainVersion, int repositoryLatestPatchVersion) {

		return new File(JOOMLA_1_5 + "Joomla_" + remoteJoomlaMainVersion + "." + remoteJoomlaMainVersion + "_to_" + remoteJoomlaMainVersion + "."
				+ repositoryLatestPatchVersion + "-Stable-Patch_Package.zip");
	}

	public File getJoomlaReferenceFile(double remoteJoomlaMainVersion, int remoteJoomlaPatchVersion) {

		return new File(JOOMLA_1_5 + "Joomla_" + remoteJoomlaMainVersion + "." + remoteJoomlaPatchVersion + "-Stable-Full_Package.zip");
	}

}
